package com.nlscan.ncomgateway.core.database.di

import android.content.Context
import androidx.room.Room
import com.nlscan.ncomgateway.core.database.AppDatabase

/**
 * <pre>
 *  author: lin.qing
 *  time  : 2023/3/23
 *  desc  : hilt
 * </pre>
 */
//@Module
//@InstallIn(SingletonComponent::class)
object DatabaseModule {

//    @Provides
//    @Singleton
//    fun providesAppDatabase(@ApplicationContext context: Context): AppDatabase =
    fun providesAppDatabase( context: Context): AppDatabase =
        Room.databaseBuilder(
            context,
            AppDatabase::class.java,
            "db_main"
        ).build()
}